var pos = [
    [724, -700],
    [724, -460],
    [724, -220],
    [724, 20],
    [1270, -640],
    [1270, -400],
    [1270, -160],
    [1270, 80],
    [-700, -700],
    [-700, -460],
    [-700, -220],
    [-700, 20],
    [-1250, -640],
    [-1250, -400],
    [-1250, -160],
    [-1250, 80]
];

function act() {
    var c = cm.getEventManager("副本_起源之塔");
    var g = c.getMapFactoryMap(cm.getMapId());
    for (var b = 0; b < pos.length; b++) {
        if (randomNum(0, 100) > 75) {
            continue
        }
        var f = 9309035;
        var e = randomNum(2, 5);
        for (var a = 0; a < e; a++) {
            var d = c.getMonster(f);
            g.spawnMonsterOnGroundBelow(d, new java.awt.Point(pos[b][0] + randomNum(-50, 50), pos[b][1]))
        }
    }
}

function randomNum(b, a) {
    switch (arguments.length) {
        case 1:
            return parseInt(Math.random() * b + 1, 10);
            break;
        case 2:
            return parseInt(Math.random() * (a - b + 1) + b, 10);
            break;
        default:
            return 0;
            break
    }
};